package Panels;

import java.awt.ComponentOrientation;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import Code.TablePanelInfo;


public class QueryToolBar extends JPanel implements ActionListener{
	
	
	private TablePanelInfo TPInfo;
	
	public QueryToolBar(TablePanelInfo TPanelInfo){
		TPInfo=TPanelInfo;
		setLayout(new FlowLayout());
		setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
		JButton RunButton=new JButton("Run Query");
		RunButton.addActionListener(this);
		
		JToolBar ToolBar=new JToolBar();
		ToolBar.setFloatable(false);
		ToolBar.add(RunButton);
		
		add(ToolBar);
	}

	
	public void RunQueryAction(){
		
	}
	
	@Override
	public void actionPerformed(ActionEvent Event){
		TPInfo.RunQuery();
	}
	
	
}
